package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 兑换记录对象 reward_exchange
 * 
 * @author xukai
 * @date 2024-12-22
 */
public class RewardExchange extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 流水号 */
    @Excel(name = "流水号")
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private String userId;

    /** 奖品id */
    @Excel(name = "奖品id")
    private Long rewardId;

    /** 兑换时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "兑换时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date exchangeTime;

    /** 兑换数量 */
    @Excel(name = "兑换数量")
    private Long amount;

    /** 领取方式 1-公司领取 2-邮寄 */
    private Integer receiveType;



    /** 收货地址ID（邮寄时必填） */
    private Long addressId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }
    public void setRewardId(Long rewardId) 
    {
        this.rewardId = rewardId;
    }

    public Long getRewardId() 
    {
        return rewardId;
    }
    public void setExchangeTime(Date exchangeTime) 
    {
        this.exchangeTime = exchangeTime;
    }

    public Date getExchangeTime() 
    {
        return exchangeTime;
    }
    public void setAmount(Long amount) 
    {
        this.amount = amount;
    }

    public Long getAmount() 
    {
        return amount;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setReceiveType(Integer receiveType) {
        this.receiveType = receiveType;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public Long getAddressId() {
        return addressId;
    }

    public Integer getReceiveType() {
        return receiveType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("rewardId", getRewardId())
            .append("exchangeTime", getExchangeTime())
            .append("amount", getAmount())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
                .append("receiveType", getReceiveType())
                .append("addressId", getAddressId())
            .toString();
    }
}
